<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>ExtrudeGeometry - Three.js Docs</title>
	<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
	<script src="../scripts/highlight.min.js"></script>
	<link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
	<link type="text/css" rel="stylesheet" href="../styles/page.css">
</head>
<body>
		<p class="inheritance" translate="no"><a href="EventDispatcher.html">EventDispatcher</a> → <a href="BufferGeometry.html">BufferGeometry</a> → </p>
	<h1 translate="no">ExtrudeGeometry</h1>
		<section>
			<header>
				<div class="class-description"><p>Creates extruded geometry from a path shape.</p></div>
				<iframe id="viewer" src="../scenes/geometry-browser.html#ExtrudeGeometry"></iframe>
				<h2>Code Example</h2>
				<div translate="no"><pre><code class="language-js">const length = 12, width = 8;
const shape = new THREE.Shape();
shape.moveTo( 0,0 );
shape.lineTo( 0, width );
shape.lineTo( length, width );
shape.lineTo( length, 0 );
shape.lineTo( 0, 0 );
const geometry = new THREE.ExtrudeGeometry( shape );
const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
const mesh = new THREE.Mesh( geometry, material ) ;
scene.add( mesh );
</code></pre></div>
			</header>
			<article>
				<div class="container-overview">
					<h2>Constructor</h2>
					<h3 class="name name-method" id="ExtrudeGeometry" translate="no">new <a href="#ExtrudeGeometry">ExtrudeGeometry</a><span class="signature">( shapes : <span class="param-type"><a href="Shape.html">Shape</a> | Array.&lt;<a href="Shape.html">Shape</a>></span>, options : <span class="param-type"><a href="ExtrudeGeometry.html#~Options">ExtrudeGeometry~Options</a></span> )</span> </h3>
					<div class="method">
						<div class="description">
							<p>Constructs a new extrude geometry.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>shapes</strong>
									</td>
									<td class="description last">
										<p>A shape or an array of shapes.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>options</strong>
									</td>
									<td class="description last">
										<p>The extrude settings.</p>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<h2 class="subsection-title">Properties</h2>
				<div class="member">
					<h3 class="name" id="parameters" translate="no">.<a href="#parameters">parameters</a><span class="type-signature"> : Object</span> </h3>
					<div class="description">
						<p>Holds the constructor parameters that have been
used to generate the geometry. Any modification
after instantiation does not change the geometry.</p>
					</div>
				</div>
				<h2 class="subsection-title">Static Methods</h2>
					<h3 class="name name-method" id=".fromJSON" translate="no">.<a href="#.fromJSON">fromJSON</a><span class="signature">( data : <span class="param-type">Object</span>, shapes : <span class="param-type">Array.&lt;<a href="Shape.html">Shape</a>></span> )</span><span class="type-signature"> : <a href="ExtrudeGeometry.html">ExtrudeGeometry</a></span> </h3>
					<div class="method">
						<div class="description">
							<p>Factory method for creating an instance of this class from the given
JSON object.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>data</strong>
									</td>
									<td class="description last">
										<p>A JSON object representing the serialized geometry.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>shapes</strong>
									</td>
									<td class="description last">
										<p>An array of shapes.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> A new instance.</dt>
						</dl>
					</div>
				<h2 class="subsection-title">Type Definitions</h2>
				<div class="member">
					<h3 class="name" id="~Options" translate="no">.<a href="#~Options">Options</a> </h3>
					<div class="description">
						<p>Represents the <code>options</code> type of the geometry's constructor.</p>
					</div>
<table class="props">
	<tbody>
		<tr>
				<td class="name">
					<strong>curveSegments</strong>
						<br>
<span class="param-type">number</span>
				</td>
			<td class="description last">
				<p>Number of points on the curves.</p>
						<p>Default is <code>12</code>.</p>
			</td>
		</tr>
		<tr>
				<td class="name">
					<strong>steps</strong>
						<br>
<span class="param-type">number</span>
				</td>
			<td class="description last">
				<p>Number of points used for subdividing segments along the depth of the extruded spline.</p>
						<p>Default is <code>1</code>.</p>
			</td>
		</tr>
		<tr>
				<td class="name">
					<strong>depth</strong>
						<br>
<span class="param-type">number</span>
				</td>
			<td class="description last">
				<p>Depth to extrude the shape.</p>
						<p>Default is <code>1</code>.</p>
			</td>
		</tr>
		<tr>
				<td class="name">
					<strong>bevelEnabled</strong>
						<br>
<span class="param-type">boolean</span>
				</td>
			<td class="description last">
				<p>Whether to beveling to the shape or not.</p>
						<p>Default is <code>true</code>.</p>
			</td>
		</tr>
		<tr>
				<td class="name">
					<strong>bevelThickness</strong>
						<br>
<span class="param-type">number</span>
				</td>
			<td class="description last">
				<p>How deep into the original shape the bevel goes.</p>
						<p>Default is <code>0.2</code>.</p>
			</td>
		</tr>
		<tr>
				<td class="name">
					<strong>bevelSize</strong>
						<br>
<span class="param-type">number</span>
				</td>
			<td class="description last">
				<p>Distance from the shape outline that the bevel extends.</p>
						<p>Default is <code>bevelThickness-0.1</code>.</p>
			</td>
		</tr>
		<tr>
				<td class="name">
					<strong>bevelOffset</strong>
						<br>
<span class="param-type">number</span>
				</td>
			<td class="description last">
				<p>Distance from the shape outline that the bevel starts.</p>
						<p>Default is <code>0</code>.</p>
			</td>
		</tr>
		<tr>
				<td class="name">
					<strong>bevelSegments</strong>
						<br>
<span class="param-type">number</span>
				</td>
			<td class="description last">
				<p>Number of bevel layers.</p>
						<p>Default is <code>3</code>.</p>
			</td>
		</tr>
		<tr>
				<td class="name">
					<strong>extrudePath</strong>
						<br>
<span class="param-type"><a href="Curve.html">Curve</a></span>
				</td>
			<td class="description last">
				<p>A 3D spline path along which the shape should be extruded. Bevels not supported for path extrusion.</p>
						<p>Default is <code>null</code>.</p>
			</td>
		</tr>
		<tr>
				<td class="name">
					<strong>UVGenerator</strong>
						<br>
<span class="param-type">Object</span>
				</td>
			<td class="description last">
				<p>An object that provides UV generator functions for custom UV generation.</p>
			</td>
		</tr>
	</tbody>
</table>
				</div>
				<h2 class="subsection-title">Source</h2>
				<p>
					<a href="https://github.com/mrdoob/three.js/blob/master/src/geometries/ExtrudeGeometry.js" translate="no" target="_blank" rel="noopener">src/geometries/ExtrudeGeometry.js</a>
				</p>
			</article>
		</section>
<script src="../scripts/linenumber.js"></script>
<script src="../scripts/page.js"></script>
</body>
</html>